import SDK from '../common/IM/sdk/NIM_Web_SDK_weixin_v7.2.0.js'
import config from '../common/IM/neteaseConfig.js'
import Vue from 'vue'
const mutations = {
	login(state) {
		state.isLogin = true
		const imState = SDK.NIM.getInstance({
			...config,
			account: '4903533184816128',
			token: '4903533184816128',
		})
		Vue.prototype.$IM = imState
		console.log('登录成功')
	},
	updateConversationList(state,msg) {
		state.messageList.push(msg)
	},
	updateMessageList(state,arr) {
		state.messageList = arr
	}
}
export default mutations